package com.heima;

class Demo1_Interface 
{
	public static void main(String[] args) 
	{
		//Demo d = new Demo();
		//Inter d = new Demo();
		Demo d = new Demo();
		d.printA();
		d.printB();
	}
}

interface Inter
{
	public abstract void print(); //接口中的方法都是抽象方法
}

interface InterA
{
	public abstract void printA(); 
}

interface InterB
{
	public abstract void printB(); 
}

class Demo implements InterA,InterB
{
	public void printA(){
		System.out.println("printA");
	}

	public void printB(){
		System.out.println("printB");
	}
}